﻿

#region Using Statements

// System References
using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Threading;

// XNA References
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;

// Internal References
using Freeform.Framework;

#endregion


namespace Freeform.Framework.Geometry.Collision
{
    /// <summary>
    /// A CollisionGeometry class performs the actual geometric collision test against another CollisionGeometry class.
    /// This class should be extended by classes such as CollisionGeometry_Circular, CollisionGeometry_LineSegment etc.
    /// </summary>
    public class CollisionGeometry
    {

        #region Members

        /// <summary>
        /// Gets the entity that this collision geometry represents.
        /// </summary>
        public Entity Entity { get; protected set; }

        #endregion


        #region Initialisation

        /// <summary>
        /// Creates a new collision geometry class.
        /// </summary>
        /// <param name="entity">The entity for which the geometry represents.</param>
        public CollisionGeometry(Entity entity)
        {
            Entity = entity;
            Entity.CollisionProperties.Geometry = this;
        }

        #endregion


        #region Utility

        /// <summary>
        /// Checks whether or not the two collision properties collide.
        /// </summary>
        /// <param name="other">The collision property of the other entity.</param>
        /// <returns>True if and only if the two geometries collide.</returns>
        public virtual Boolean CheckCollision(CollisionGeometry other) { return false; }

        #endregion

    }
}
